#ifndef FLASH_FILE_SYS_H
#define FLASH_FILE_SYS_H
#ifdef WIN32
#include "StdAfx.h"
#endif
#include "typedef.h"

#ifndef  ___SDFILE__
#define  ___SDFILE__
typedef struct ___SDFILE
{
u32 addr;
u32 length;
u32 pointer;
u16 crc ;
}SDFILE ,SD_FILE,*PSDFILE ;
#endif 

typedef struct __FLASHHEADER 
{
	u16 crc16;
	u16 crcfileheaddata;
	u8 info[8];
	u32 filenum;
	u32 version;
	u32 version1;
	u8 chiptype[8];
}FLASHHEADER;

typedef struct __FILEHEAD
{
	u8 filetype;
	u8 reserv;
	u16 crc16;
	u32 addr;
	u32 length;
	u32 version;
	u8 name[16];		
}FLASHFILEHEAD ,*PFLASHPFILEHEAD ;



#define FILE_TYPE_OPT_DATA  			0x00 
#define FILE_TYPE_CD_ROM_DATA  			0x01
#define FILE_TYPE_PROGRAM_DATA  		0x02
#define FILE_TYPE_INFO         			0x03
#define FILE_TYPE_CTF          			0x04
#define FILE_TYPE_NUKNOW				0xff 

#define FLASH_BLOCK_SIZE   				0x10000
extern FLASHFILEHEAD _xdata cdromfileheader ;


#endif 
